//+--------------------------------------------------------------------------------
//| Copyright (c) 2012 - 2013 ### an.vuongngocduy
//| This file is a part of Compact Game Engine (CGE)
//+--------------------------------------------------------------------------------
#ifndef __CGE_CANVASWIN32_H__
#define __CGE_CANVASWIN32_H__

#include "cgeCanvas.h"
#include "cgeRenderer.h"

namespace cge
{
	class CanvasWin32 : public Canvas
	{
	public:
		//! Default constructor
		CanvasWin32();

		
		//! Destructor
		~CanvasWin32();


		//! Return the handle of window
		HWND GetHWND() const;


		//! Set up canvas
		void Setup(const String& title, const Vector2u& position, const Dimension2u& dimension, b8 fullScreen);


		//! Show window
		void Show();

		
		//! Render all scene node
		void Render();

	public:
		//! Handle system messages from Windows OS
		static LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

		//! Get and dispatch messages of Windows OS
		static b8 WindowMessageDispatch(void* data);

	private:
		HWND mWinHandle;
	};
}

#endif//__CGE_CANVASWIN32_H__